home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / emacs-complete / fsf / emacs / src / s / irix5-0.h < prev    next >
C/C++ Source or Header  |  1994-08-24  |  3KB  |  105 lines

  1. #include "usg5-4.h"
  2.  
  3. #define IRIX5
  4.  
  5. #define SETPGRP_RELEASES_CTTY
  6.  
  7. #ifdef LIBS_SYSTEM
  8. #undef LIBS_SYSTEM
  9. #endif
  10.  
  11. #ifdef LIB_STANDARD
  12. #undef LIB_STANDARD
  13. #endif
  14.  
  15. #ifdef SYSTEM_TYPE
  16. #undef SYSTEM_TYPE
  17. #endif
  18. #define SYSTEM_TYPE "irix"
  19.  
  20. #ifdef SETUP_SLAVE_PTY
  21. #undef SETUP_SLAVE_PTY
  22. #endif
  23.  
  24. /* thomas@mathematik.uni-bremen.de says this is needed.  */
  25. /* Make process_send_signal work by "typing" a signal character on the pty.  */
  26. #define SIGNALS_VIA_CHARACTERS
  27.  
  28. /* Define HAVE_ALLOCA to say that the system provides a properly
  29.    working alloca function and it should be used. */
  30. #define HAVE_ALLOCA
  31. #undef C_ALLOCA
  32.  
  33. #ifndef NOT_C_CODE
  34. #ifndef __GNUC__
  35. #include <alloca.h>
  36. #endif
  37. #endif
  38.  
  39. /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
  40.    because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.)  Instead
  41.    we'll just define WNOHANG right here.
  42.    (An implicit decl is good enough for wait3.)  */
  43.  
  44. /* #define WNOHANG        0x1 */
  45.  
  46. /* No need to use sprintf to get the tty name--we get that from _getpty.  */
  47. #ifdef PTY_TTY_NAME_SPRINTF
  48. #undef PTY_TTY_NAME_SPRINTF
  49. #endif
  50. #define PTY_TTY_NAME_SPRINTF
  51. /* No need to get the pty name at all.  */
  52. #ifdef PTY_NAME_SPRINTF
  53. #undef PTY_NAME_SPRINTF
  54. #endif
  55. #define PTY_NAME_SPRINTF
  56. #ifdef emacs
  57. char *_getpty();
  58. #endif
  59. /* We need only try once to open a pty.  */
  60. #define PTY_ITERATION
  61. /* Here is how to do it.  */
  62. /* It is necessary to prevent SIGCHLD signals within _getpty.
  63.    So we block them. But since all of Emacs uses classic SYSV signal()
  64.    signals, there is no reliable way to do this (unlike BSD sighold or
  65.    POSIX sigaction).  On Irix 5.* systems, the implementation of
  66.    sigaction is as close as you can get to a universal. */
  67. #define PTY_OPEN                        \
  68. {                                \
  69.   struct sigaction ocstat, cstat;                \
  70.   char * name;                            \
  71.   sigemptyset(&cstat.sa_mask);                    \
  72.   cstat.sa_handler = SIG_DFL;                    \
  73.   cstat.sa_flags = 0;                        \
  74.   sigaction(SIGCLD, &cstat, &ocstat);                \
  75.   name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0);        \
  76.   sigaction(SIGCLD, &ocstat, (struct sigaction *)0);        \
  77.   if (name == 0)                        \
  78.     return -1;                            \
  79.   if (fd < 0)                            \
  80.     return -1;                            \
  81.   if (fstat (fd, &stb) < 0)                    \
  82.     return -1;                            \
  83.   strcpy (pty_name, name);                    \
  84. }
  85.  
  86. /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
  87.    on this system, so inhibit use of matherr.  */
  88. #define NO_MATHERR
  89.  
  90. /* Info from simon@lia.di.epfl.ch (Simon Leinen) suggests this is needed.  */
  91. #define GETPGRP_NO_ARG
  92.  
  93. /* Ulimit(UL_GMEMLIM) is busted...  */
  94. #define ULIMIT_BREAK_VALUE 0x14000000
  95.  
  96. /* Tell process_send_signal to use VSUSP instead of VSWTCH.  */
  97. #define PREFER_VSUSP
  98.  
  99. /* Because unexelfsgi.c cannot handle a ".sbss" section yet, we must
  100.    tell the linker to avoid making one.  SGI's cc does this by
  101.    default, but GCC (at least 2.5.8 and 2.6.0) doesn't. */
  102. #ifdef __GNUC__
  103. #define LD_SWITCH_SYSTEM -G 0
  104. #endif
  105.